/*
 * @Date: 2025-06-03 18:01:41
 * @LastEditors: Csir 2215995096@qq.com
 * @LastEditTime: 2025-07-17 17:55:09
 * @FilePath: \infomng-ui\src\api\hengdong\pfocinterface.js
 */
import request from "@/router/axios";

//获取设备分类
export function getDeviceClassList() {
  return request({
    url: "/admin-api/o3-hengdong/admin-api/o3-pfocInterface/getDic",
    method: "get",
  });
}

/**
 * 获取组织机构
 * @returns {AxiosPromise}
 */
export function getOrganization() {
  
  return request({
    url: "/admin-api/o3-hengdong/pfocInterface/getOrganization?parentId=-1",
    method: "get",
  });
}

/**
 * 获取设备（根据设备分类）、工具（deviceClass=20）、夹具（deviceClass=20）、position（组织名称筛选设备数据）
 * @returns {AxiosPromise}
 */
export function getDevice(obj) {
  return request({
    url: "/admin-api/o3-hengdong/admin-api/o3-pfocInterface/getDeviceList",
    method: "get",
    params: obj,
  });
}

export function getNewDevice(obj) {
  return request({
    url: "/admin-api/o3-hengdong/admin-api/o3-pfocInterface/getNewDeviceList",
    method: "get",
    params: obj,
  });
}

export function getPersonGrades() {
  return request({
    url: "/admin-api/system/dict-data/type?type=person_grades",
    method: "get",
  });
}

export function getLineType() {
  return request({
    url: "/admin-api/system/dict-data/type?type=line_type",
    method: "get",
  });
}
